const {injectBabelPlugin} = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less');

module.exports = function override(config, env) {
    // do stuff with the webpack config...
    config = rewireLess(config, env);
    config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css' }], config);

    /**
     * 修改皮肤
     */
    // config = injectBabelPlugin(['import', {libraryName: 'antd', style: true}], config);
    // config = rewireLess.withLoaderOptions({
    //     modifyVars: {"@primary-color": "#1DA57A"},
    // })(config, env);
    return config;
};